package org.liang.exception;

/**
 * 业务类的异常，系统已知的异常
 */
public class BusinessException extends RuntimeException{

    private Integer code;

    public BusinessException() {
        super();
    }
    
    public BusinessException(String msg) {
        super(msg);
    }

    public BusinessException(ResponseCode responseCode) {
        super(responseCode.getMessage());
        this.code = responseCode.getCode();
    }

    public Integer getCode() {
        return code;
    }
}